﻿@model IEnumerable<mscook.core.domain.Comment>
@if (Model != null)
{
    for (int i = 0; i < Model.Count(); i++)
    {
        var comment = Model.ElementAt(i);
    <li class="clearfix">
        <div class="span1 uhead">
            <div class="head_img">
                <img src="~/Images/head.jpg" />
            </div>
            <p class="uname"><a href="#">@Html.Encode(comment.FormLoginUser.LoginName)</a></p>
        </div>
        <div class="span6">
            <p>@Html.Encode(comment.Content)</p>
            <p>
                <span class="time">@Html.Encode((comment.ToLoginUser == null ? "" : ("回复:" + comment.ToLoginUser.LoginName + "  ")) + comment.CreateTime.ToString())</span>
                <a href="javascript:void(0); " class="reply_btn"  data-link-reply="@Html.Encode("replyMorediv" + i)">回复</a><a href="javascript:void(0); "  data-link-reply="@Html.Encode("replyMorediv" + i)" class="reply_hide">收起</a>
            </p>
            <div class="span6 reply" id="@Html.Encode("replyMorediv" + i)">
                <div class="span6">
                    <input type="hidden" value="@comment.FormLoginUser.LoginName" />
                    <textarea id="@Html.Encode("replyMore" + i)" rows="6" class="span5"></textarea>
                </div>
                <div class="span5 clearfix">
                    <a href="javascript:void(0);" data-parentcomment="@Html.Encode(comment.Id)" data-link-content="@Html.Encode("replyMore" + i)" data-tologinuser="@Html.Encode(comment.FormLoginUser.LoginName)" class="replyComment comment_btn btn">回复</a>
                </div>
            </div>
        </div>

    </li>
                            
    }
}
